﻿<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ include file="../taglibs.jsp" %>

<s:set id="currentUser" value="#session.currentUser" />

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../../css/style.css" />
<title><s:text name="FILE.label.title"/></title>
</head>

<body>
  <div id="header-div">
    <div id="banner-div">
      <div style="float:left; margin-left:1%;"><h1>海川数据</h1></div>
      <img style="float:right; margin-top:21px; margin-right:1%;" src="../../images/topm131.jpg" />
    </div>
    <div id="toolbar-div">
      <div id="toolbar-div-left">
        <img src="../../images/emoticon_smile.png" /><s:text name="FILE.label.header.welcome"/><strong>&nbsp;<s:property value="#currentUser.name"/></strong>
        &nbsp;&nbsp;帐户状态：<s:property value="#currentUser.status==0?'未开通':'已开通'"/>
        &nbsp;&nbsp;帐户余额：<s:property value="#currentUser.balance"/>元
      </div>
      <div id="toolbar-div-right">
        <img src="../../images/application_view_list.png" /><a href="list.jsp" onclick="activeMenu(1)" target="mainFrame"><span id="menu1">数据管理</span></a>
        <s:if test="'exportData' in #currentUser.permissions">
        <img src="../../images/page_excel.png" /><a href="javascript:exportData();"><span id="menu2">导出数据</span></a>
        </s:if>
        <s:else>
        <img src="../../images/page_excel.png" /><a href="javascript:exportData();" disabled="disabled">导出数据</a>
        </s:else>
        <!--img src="../../images/user_edit.png" /><a href="${webroot}/user/editUser.do" target="mainFrame"><s:text name="FILE.label.header.chpwd"/></a-->
        <img src="../../images/stop.png" /><a href="../../user/logout.do" target="_top"><s:text name="FILE.label.header.logout"/></a>
      </div>
    </div>
  </div>

<script type="text/javascript">
//<!--

activeMenu(1);

function exportData() {
    activeMenu(2);
    if (top.mainFrame.HaiChuan.isSearch == 'true') {
        var form = top.mainFrame.searchForm;
        form.action = '${webroot}/data/exportData.do';
        form.submit();
    } else {
        document.location.target = 'mainFrame';
        document.location.href = '${webroot}/data/exportData.do';
    }
}

function activeMenu(n) {
    for (var i = 1; i <= 2; i++) {
        document.getElementById('menu' + i).className = '';
    }
    document.getElementById('menu' + n).className = 'activemenu';
}

//-->
</script>

</body>
</html>
